<?
if(!defined ('U_MOD'))
{
	echo"<meta http-equiv='refresh' content='0;url=/index.php'>";
	exit;
}

include 'topmenu.php';

$queryRights=mysql_query("SELECT * FROM ".$PortalPref."right ORDER BY right_value ASC");

print '<table>';
$dd=1;
while ($resultRights=mysql_fetch_assoc($queryRights))
{	$addToLink='&ref='.$apk;
	if ($resultRights['right_value']==0 || $resultRights['right_value']==100000 || $resultRights['right_value']==70000)
	{
		$sysIcon='<img src="'.$portal_url.'/images/icon/16x16_png/alert.png" id="img-action" title="'._SYSTEM_RIGHT_.'" >';
		$delIcon='';
		$modifyIcon='';
	}else
	{
		$sysIcon='';
		$delIcon='<a href="'.$portal_url.'/admin.php?amk='.$amk.'&apk=change&act=1&rid='.$resultRights['right_id'].''.$addToLink.'" onClick="return confirm(\''._CLICKDEL_.' '._THISRIGHT_.': '.pEcho($resultRights['right_title']).'\');"><img src="'.$portal_url.'/images/icon/16x16_png/delete.png" id="img-action" title="'._DEL_TITLE_.'" ></a>';
		$modifyIcon='<a href="'.$portal_url.'/admin.php?amk='.$amk.'&apk=managerights&act=3&rid='.$resultRights['right_id'].''.$addToLink.'"><img src="'.$portal_url.'/images/icon/16x16_png/modify.png" id="img-action" title="'._MODIFY_TITLE_.'" ></a>';
	}

 $dd++;$iclass = ($dd % 2) ? "even" : "odd";
 print '<tr id="'.$iclass.'">
 	<td>'.$resultRights['right_value'].'</td>
 	<td>'.pEcho($resultRights['right_title']).'</td>
	<td id="column-action">'.$sysIcon.''.$modifyIcon.''.$delIcon.'</td>
 </tr>';}
print'</table>';
?>